﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     
    xmlns:my="clr-namespace:MDCAdminTool"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="MDCAdminTool.Controls.ClusterControl"
    
   mc:Ignorable="d"
   >
   <UserControl.Resources>
      <Image x:Key="ClusterImage" Source="..\Resources\Network_Center.png" Width="48" Height="48"/>
   </UserControl.Resources>
   <GroupBox Header="Cache Cluster">
      <Grid>
       
      <Grid.RowDefinitions>
         <RowDefinition Height="30*" />
         <RowDefinition Height="200*" />
         <RowDefinition Height="30*" />
      </Grid.RowDefinitions>
         <StackPanel x:Name="spTitle" Grid.Row="0" Orientation="Horizontal" Margin="15,0,0,0">
            <StaticResource ResourceKey="ClusterImage"/>
            <TextBlock x:Name="HeaderText" Text="Cache Cluster" FontSize="32" FontWeight="Bold" Margin="15,0,0,0" />
         </StackPanel>
        
         
      	<StackPanel x:Name="spBody" Margin="15" Orientation="Vertical" Grid.Row="1" d:LayoutOverrides="Height">
            
           <GroupBox Header="Cache Cluster Config File" Padding="15" Margin="0,0,0,25">
               <Grid x:Name="gridCacheClusterConfigFile">

                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="Auto" />
                     <ColumnDefinition Width="Auto" />
                  </Grid.ColumnDefinitions>

                  <Label Content="Config File:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                  <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0">
                     <TextBox Height="23" HorizontalAlignment="Left" Margin="3" x:Name="configFileTextBox" Text="{Binding ConnectionString}" VerticalAlignment="Center" Width="188.8" />
                     <Button Height="23" Width="16" Margin="0,0,5,0" Click="OpenConnectionDialog" Content="..."/>
                  </StackPanel>

               </Grid>
            </GroupBox>
           
      		<GroupBox Header="Cluster Config Info" Padding="15" >
         
      			<Grid x:Name="gridCacheCluster">
         
      				<Grid.ColumnDefinitions>
      					<ColumnDefinition Width="Auto" />
      					<ColumnDefinition Width="Auto" />
      				</Grid.ColumnDefinitions>
         
      				<Grid.RowDefinitions>
      					<RowDefinition Height="Auto" />
      					<RowDefinition Height="Auto" />
      					<RowDefinition Height="Auto" />
      					<RowDefinition Height="Auto" />
      					<RowDefinition Height="Auto" />
      				</Grid.RowDefinitions>
         
      				<Label Content="Connection String:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
      				<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0">
      					<TextBox Height="23" HorizontalAlignment="Left" Margin="3" x:Name="connectionStringTextBox" Text="{Binding ConnectionString}" VerticalAlignment="Center" Width="150" />
      					<Button Height="23" Width="16" Margin="0,0,5,0" Click="OpenConnectionDialog" Content="..."/>
      				</StackPanel>
         
      				<Label Content="Is Open:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
      				<CheckBox Grid.Column="1" Grid.Row="1" Height="16" HorizontalAlignment="Left" IsChecked="{Binding IsOpen}" Margin="3" x:Name="isOpenCheckBox" VerticalAlignment="Center" Width="150" />
         
      				<Label Content="Name:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
      				<TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="3" x:Name="nameTextBox" Text="{Binding Name}" VerticalAlignment="Center" Width="150" />
      				<Label Content="Provider:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
         
      				<TextBox Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="3" x:Name="providerTextBox" Text="{Binding Provider}" VerticalAlignment="Center" Width="150" />
         
      				<Label Content="Status:" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
      				<TextBox Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Left" Margin="3" x:Name="statusTextBox" Text="{Binding Status}" VerticalAlignment="Center" Width="150" />
         
      			</Grid>         
         
      		</GroupBox>         
         
      	</StackPanel>         
         
         <StackPanel x:Name="spFooter" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,15,0">
                <Button Height="23" Width="75" Margin="5,0,5,0" Content="Cancel"/>
            <Button Height="23" Width="75" Margin="5,0,5,0" Content="Save"/>
         </StackPanel>
         
      </Grid>
   </GroupBox>
</UserControl>
